package com.app.bimo.library_db.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.app.bimo.library_db.ADConfigResultData;
import com.app.bimo.library_db.AppData;
import com.app.bimo.library_db.BookData;
import com.app.bimo.library_db.BookRecord;
import com.app.bimo.library_db.ChapterData;
import com.app.bimo.library_db.ChapterRecord;
import com.app.bimo.library_db.FontTypeData;
import com.app.bimo.library_db.ReadDayRecord;
import com.app.bimo.library_db.ReadTimeRecord;
import com.app.bimo.library_db.SearchData;
import com.app.bimo.library_db.SearchHistory;
import com.app.bimo.library_db.UserData;

import com.app.bimo.library_db.dao.ADConfigResultDataDao;
import com.app.bimo.library_db.dao.AppDataDao;
import com.app.bimo.library_db.dao.BookDataDao;
import com.app.bimo.library_db.dao.BookRecordDao;
import com.app.bimo.library_db.dao.ChapterDataDao;
import com.app.bimo.library_db.dao.ChapterRecordDao;
import com.app.bimo.library_db.dao.FontTypeDataDao;
import com.app.bimo.library_db.dao.ReadDayRecordDao;
import com.app.bimo.library_db.dao.ReadTimeRecordDao;
import com.app.bimo.library_db.dao.SearchDataDao;
import com.app.bimo.library_db.dao.SearchHistoryDao;
import com.app.bimo.library_db.dao.UserDataDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig aDConfigResultDataDaoConfig;
    private final DaoConfig appDataDaoConfig;
    private final DaoConfig bookDataDaoConfig;
    private final DaoConfig bookRecordDaoConfig;
    private final DaoConfig chapterDataDaoConfig;
    private final DaoConfig chapterRecordDaoConfig;
    private final DaoConfig fontTypeDataDaoConfig;
    private final DaoConfig readDayRecordDaoConfig;
    private final DaoConfig readTimeRecordDaoConfig;
    private final DaoConfig searchDataDaoConfig;
    private final DaoConfig searchHistoryDaoConfig;
    private final DaoConfig userDataDaoConfig;

    private final ADConfigResultDataDao aDConfigResultDataDao;
    private final AppDataDao appDataDao;
    private final BookDataDao bookDataDao;
    private final BookRecordDao bookRecordDao;
    private final ChapterDataDao chapterDataDao;
    private final ChapterRecordDao chapterRecordDao;
    private final FontTypeDataDao fontTypeDataDao;
    private final ReadDayRecordDao readDayRecordDao;
    private final ReadTimeRecordDao readTimeRecordDao;
    private final SearchDataDao searchDataDao;
    private final SearchHistoryDao searchHistoryDao;
    private final UserDataDao userDataDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        aDConfigResultDataDaoConfig = daoConfigMap.get(ADConfigResultDataDao.class).clone();
        aDConfigResultDataDaoConfig.initIdentityScope(type);

        appDataDaoConfig = daoConfigMap.get(AppDataDao.class).clone();
        appDataDaoConfig.initIdentityScope(type);

        bookDataDaoConfig = daoConfigMap.get(BookDataDao.class).clone();
        bookDataDaoConfig.initIdentityScope(type);

        bookRecordDaoConfig = daoConfigMap.get(BookRecordDao.class).clone();
        bookRecordDaoConfig.initIdentityScope(type);

        chapterDataDaoConfig = daoConfigMap.get(ChapterDataDao.class).clone();
        chapterDataDaoConfig.initIdentityScope(type);

        chapterRecordDaoConfig = daoConfigMap.get(ChapterRecordDao.class).clone();
        chapterRecordDaoConfig.initIdentityScope(type);

        fontTypeDataDaoConfig = daoConfigMap.get(FontTypeDataDao.class).clone();
        fontTypeDataDaoConfig.initIdentityScope(type);

        readDayRecordDaoConfig = daoConfigMap.get(ReadDayRecordDao.class).clone();
        readDayRecordDaoConfig.initIdentityScope(type);

        readTimeRecordDaoConfig = daoConfigMap.get(ReadTimeRecordDao.class).clone();
        readTimeRecordDaoConfig.initIdentityScope(type);

        searchDataDaoConfig = daoConfigMap.get(SearchDataDao.class).clone();
        searchDataDaoConfig.initIdentityScope(type);

        searchHistoryDaoConfig = daoConfigMap.get(SearchHistoryDao.class).clone();
        searchHistoryDaoConfig.initIdentityScope(type);

        userDataDaoConfig = daoConfigMap.get(UserDataDao.class).clone();
        userDataDaoConfig.initIdentityScope(type);

        aDConfigResultDataDao = new ADConfigResultDataDao(aDConfigResultDataDaoConfig, this);
        appDataDao = new AppDataDao(appDataDaoConfig, this);
        bookDataDao = new BookDataDao(bookDataDaoConfig, this);
        bookRecordDao = new BookRecordDao(bookRecordDaoConfig, this);
        chapterDataDao = new ChapterDataDao(chapterDataDaoConfig, this);
        chapterRecordDao = new ChapterRecordDao(chapterRecordDaoConfig, this);
        fontTypeDataDao = new FontTypeDataDao(fontTypeDataDaoConfig, this);
        readDayRecordDao = new ReadDayRecordDao(readDayRecordDaoConfig, this);
        readTimeRecordDao = new ReadTimeRecordDao(readTimeRecordDaoConfig, this);
        searchDataDao = new SearchDataDao(searchDataDaoConfig, this);
        searchHistoryDao = new SearchHistoryDao(searchHistoryDaoConfig, this);
        userDataDao = new UserDataDao(userDataDaoConfig, this);

        registerDao(ADConfigResultData.class, aDConfigResultDataDao);
        registerDao(AppData.class, appDataDao);
        registerDao(BookData.class, bookDataDao);
        registerDao(BookRecord.class, bookRecordDao);
        registerDao(ChapterData.class, chapterDataDao);
        registerDao(ChapterRecord.class, chapterRecordDao);
        registerDao(FontTypeData.class, fontTypeDataDao);
        registerDao(ReadDayRecord.class, readDayRecordDao);
        registerDao(ReadTimeRecord.class, readTimeRecordDao);
        registerDao(SearchData.class, searchDataDao);
        registerDao(SearchHistory.class, searchHistoryDao);
        registerDao(UserData.class, userDataDao);
    }
    
    public void clear() {
        aDConfigResultDataDaoConfig.clearIdentityScope();
        appDataDaoConfig.clearIdentityScope();
        bookDataDaoConfig.clearIdentityScope();
        bookRecordDaoConfig.clearIdentityScope();
        chapterDataDaoConfig.clearIdentityScope();
        chapterRecordDaoConfig.clearIdentityScope();
        fontTypeDataDaoConfig.clearIdentityScope();
        readDayRecordDaoConfig.clearIdentityScope();
        readTimeRecordDaoConfig.clearIdentityScope();
        searchDataDaoConfig.clearIdentityScope();
        searchHistoryDaoConfig.clearIdentityScope();
        userDataDaoConfig.clearIdentityScope();
    }

    public ADConfigResultDataDao getADConfigResultDataDao() {
        return aDConfigResultDataDao;
    }

    public AppDataDao getAppDataDao() {
        return appDataDao;
    }

    public BookDataDao getBookDataDao() {
        return bookDataDao;
    }

    public BookRecordDao getBookRecordDao() {
        return bookRecordDao;
    }

    public ChapterDataDao getChapterDataDao() {
        return chapterDataDao;
    }

    public ChapterRecordDao getChapterRecordDao() {
        return chapterRecordDao;
    }

    public FontTypeDataDao getFontTypeDataDao() {
        return fontTypeDataDao;
    }

    public ReadDayRecordDao getReadDayRecordDao() {
        return readDayRecordDao;
    }

    public ReadTimeRecordDao getReadTimeRecordDao() {
        return readTimeRecordDao;
    }

    public SearchDataDao getSearchDataDao() {
        return searchDataDao;
    }

    public SearchHistoryDao getSearchHistoryDao() {
        return searchHistoryDao;
    }

    public UserDataDao getUserDataDao() {
        return userDataDao;
    }

}
